﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsFormsOrderManagement
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        //添加订单
        private void button1_Click(object sender, EventArgs e)
        {
            //进入添加订单界面
            AddForm addform = new AddForm();
            DialogResult result = addform.ShowDialog(); // 以模态方式打开
            
        }

        /*这个方法的弊端就是界面信息不会被保存，对于当前这个程序倒是没什么影响，对于其他程序
         可能就有不好的影响*/
        /*if (result == DialogResult.OK)
    {
        MessageBox.Show("用户点击了确认");
    }
        */
    private void button2_Click(object sender, EventArgs e)
        {
            DelForm delform = new DelForm();
            DialogResult result = delform.ShowDialog(); // 以模态方式打开
        }

        private void button3_Click(object sender, EventArgs e)
        {
            ModForm modform = new ModForm();
            DialogResult result = modform.ShowDialog(); // 以模态方式打开
        }

        private void button4_Click(object sender, EventArgs e)
        {
            SelForm selform = new SelForm();
            DialogResult result = selform.ShowDialog(); // 以模态方式打开
        }
    }
}
